//  获取热门推荐
$.ajax({
  type: 'get',
  url: '/posts/recommend',
  success:function(response) {
    let recommendTpl = `
    {{each data}}
    <li>
      <a href="javascript:;">
       <img src="{{$value.thumbnail}}" alt="">
       <p>{{$value.title}}</p>
     </a>
   </li>
    {{/each}}
    `
    let html = template.render(recommendTpl, {data: response})
    $('.recommednContent').html(html)
  }
})